import { createStore,applyMiddleware,combineReducers } from 'redux'
//下载react-thunk中间件
import countReducer from './reducers/countReducer'
import movieReducer from './reducers/movieReducer'
import thunk from 'redux-thunk'

//合并所有Reducer
const allReducer = combineReducers({
  movie:movieReducer,
  count:countReducer
})

//创建store
const store = createStore(allReducer,applyMiddleware(thunk))
export default store